Methods of unsupervised anomaly detection using a geometric framework

ABSTRACT

A method for unsupervised anomaly detection, which are algorithms that are designed to process unlabeled data. Data elements are mapped to a feature space which is typically a vector space    d . Anomalies are detected by determining which points lies in sparse regions of the feature space. Two feature maps are used for mapping data elements to a feature apace. A first map is a data-dependent normalization feature map which we apply to network connections. A second feature map is a spectrum kernel which we apply to system call traces.

CLAIM FOR PRIORITY TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.13/987,690, filed Aug. 20, 2013; which is a continuation of U.S. patentapplication Ser. No. 12/022,425, filed Jan. 30, 2008, which issued asU.S. Pat. No. 8,544,087 on Sep. 24, 2013, which is a continuation ofU.S. patent application Ser. No. 10/320,259, filed Dec. 16, 2002; whichclaims the benefit of U.S. Provisional Patent Application Ser. No.60/340,196, filed on Dec. 14, 2001, entitled “Unsupervised AnomalyDetection for Computer System Intrusion Detection and Forensics,” andU.S. Provisional Patent Application Ser. No. 60/352,894, filed on Jan.29, 2002, entitled “Geometric Framework for Unsupervised AnomalyDetection in Computer Systems: Detecting Intrusions in Unlabeled Data,”all of which are hereby incorporated by reference in their entiretyherein.

STATEMENT OF GOVERNMENT RIGHT

The present invention was made in part with support from United StatesDefense Advanced Research Projects Agency (DARPA), grant nos.FAS-526617, SRTSC-CU019-7950-1, and F30602-00-1-0603. Accordingly, theUnited States Government may have certain rights to this invention.

COMPUTER PROGRAM LISTING

A computer program listing is submitted in duplicate on CD. Each CDcontains routines which are listed in the Appendix, which CD was createdon Dec. 12, 2002, and which is 14.6 MB in size. The files on this CD areincorporated by reference in their entirety herein.

COPYRIGHT NOTICE

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by any one of the patentdisclosure, as it appears in the Patent and Trademark Office patentfiles or records, but otherwise reserves all copyright rightswhatsoever.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to systems and methods detecting anomalies in theoperation of a computer system, and more particularly to a method ofunsupervised anomaly detection.

2. Background

Intrusion detection systems (IDSs) are an integral part of any completesecurity package of a modern, well managed network system. The mostwidely deployed and commercially available methods for intrusiondetection employ signature-based detection. These methods extractfeatures from various audit streams, and detect intrusions by comparingthe feature values to a set of attack signatures provided by humanexperts. Such methods can only detect previously known intrusions sincethese intrusions have a corresponding signature. The signature databasehas to be manually revised for each new type of attack that isdiscovered and until this revision, systems are vulnerable to theseattacks.

Due to the limitations of signature-based detection, development hasproceeded on two major approaches, or paradigms, for training datamining-based intrusion detection systems: misuse detection and anomalydetection. In misuse detection approaches, each instance in a set ofdata is labeled as normal or intrusion and a machine-learning algorithmis trained over the labeled data. For example, the MADAM/ID system, asdescribed in W. Lee, S. J. Stolfo, and K. Mok, “Data Mining in Work FlowEnvironments: Experiences in Intrusion Detection,” Proceedings of the1999 Conference on Knowledge Discovery and Data Mining (KDD-99), 1999,extracts features from network connections and builds detection modelsover connection records that represent a summary of the traffic from agiven network connection. The detection models are generalized rulesthat classify the data with the values of the extracted features. Theseapproaches have the advantage of being able to automatically retrainintrusion detection models on different input data that include newtypes of attacks.

Traditional anomaly detection approaches build models of normal data anddetect deviations from the normal model in observed data. Anomalydetection applied to intrusion detection and computer security has beenan active area of research since it was originally proposed by Denning(see, e.g., D. E. Denning. “An Intrusion Detection Model,” IEEETransactions on Software Engineering, SE-I 3:222-232, 1987). Anomalydetection algorithms have the advantage that they can detect new typesof intrusions, because these new intrusions, by assumption, will deviatefrom normal usage (see. e.g., D. E. Denning, “An Intrusion DetectionModel, cited above, and H. S. Javitz and A. Valdes, “The NIDESStatistical Component: Description and Justification,” Technical Report,Computer Science Laboratory, SRI International, 1993). In this problem,given a set of normal data to train from, and given a new piece of data,the goal of the algorithm is to determine whether or not that piece ofdata is “normal” or is an “anomaly.” The notion of “normal” depends onthe specific application, but without loss of generality, normal meansstemming from the same distribution. An assumption is made that thenormal and anomalous data are created using two different probabilitydistributions and are quantitatively different because of thedifferences between their distributions. This problem is referred to assupervised anomaly detection.

Some supervised anomaly detection systems may be considered to perform“generative modeling.” These approaches build some kind of a model overthe normal data and then check to see how well new data fits into thatmodel. A survey of these techniques is given in, e.g., ChristinaWarrender, Stephanie Forrest, and Barak Pearlmutter, “DetectingIntrusions Using System Calls: Alternative Data Models,” 1999 IEEESymposium on Security and Privacy, pages 133-145. IEEE Computer Society,1999. One approach uses a prediction model obtained by training decisiontrees over normal data (see., e.g., W. Lee and S. J. Stolfo, “DataMining Approaches For Intrusion Detection,” Proceedings of the 1998USENIX Security Symposium, 1998), while another one uses neural networksto obtain the model (see, e.g., A. Ghosh and A. Schwartzbard, “A Studyin Using Neural Networks For Anomaly and Misuse Detection,” Proceedingsof the 8th USENIX Security Symposium, 1999). Ensemble-based approachesare presented in, e.g., W. Fan and S. Stolfo, “Ensemble-Based AdaptiveIntrusion Detection,” Proceedings of 2002 SIAM International Conferenceon Data Mining, Arlington, Va., 2002. Recent works such as, e.g., NongYe, “A Markov Chain Model of Temporal Behavior for Anomaly Detection,”Proceedings of the 2000 IEEE Systems, Man, and Cybernetics InformationAssurance and Security Workshop, 2000, and Eleazar Eskin, Wenke Lee, andSalvatore J. Stolfo, “Modeling System Calls For Intrusion Detection WithDynamic Window Sizes,” Proceedings of DARPA Information SurvivabilityConference and Exposition II (DISCEX II), Anaheim, Calif., 2001,estimate parameters of a probabilistic model over the normal data andcompute how well new data fits into the model.

A limitation of supervised anomaly detection algorithms is that theyrequire a set of purely normal data from which they train their model.If the data contains some intrusions buried within the training data,the algorithm may not detect future instances of these attacks becauseit will assume that they are normal. However, in practice, labeled orpurely normal data may not be readily available. Consequently, the useof the traditional data mining-based approaches may be impractical.Generally, this approach may require large volumes of audit data, andthus it may be prohibitively expensive to classify data manually. It ispossible to obtain labeled data by simulating intrusions, but thedetection system trained under such simulations may be limited to theset of known attacks that were simulated and new types of attacksoccurring in the future would not be reflected in the training data.Even with manual classification, this approach is still limited toidentifying only the known (at classification time) types of attacks,thus restricting detection to identifying only those types. In addition,if raw data were collected from a network environment, it is difficultto guarantee that there are no attacks during the time in which the datais collected.

Due to the limitations of traditional anomaly detection, there has beendevelopment of a third paradigm of intrusion detection algorithms,unsupervised anomaly detection (also known as “anomaly detection overnoisy data”) as described in greater detail in E. Eskin, “AnomalyDetection Over Noisy Data Using Learned Probability Distributions,”Proceedings of the International Conference on Machine Learning, 2000,to address these problems. These algorithms take as input a set ofunlabeled data and attempt to find intrusions buried within the data. Inthe unsupervised anomaly detection problem, the algorithm uses a set ofdata where it is unknown which are the normal elements and which are theanomalous elements. The goal is to recover the anomalous elements. Afterthese anomalies or intrusions are detected and/or removed, a misusedetection algorithm or a traditional anomaly detection algorithm may betrained over the data. The goal is to recover the anomalous elements.The model that is computed and that identifies anomalies may be used todetect anomalies in new data, e.g., for online detection of anomalies innetwork traffic. Alternatively, after these anomalies or intrusions aredetected and/or removed, a misuse detection algorithm or a traditionalanomaly detection algorithm may be trained over the cleaned data.

In practice, unsupervised anomaly detection has many advantages oversupervised anomaly detection. One advantage is that it does not requirea purely normal training set. Unsupervised anomaly detection algorithmscan be performed over unlabeled data, which is typically easier toobtain since it is simply raw audit data collected from a system. Inaddition, unsupervised anomaly detection algorithms can be used toanalyze historical data to use for forensic analysis. Furthermore, anauditable system can generate data for use in a variety of detectiontasks, including network packet data, operating system data, file systemdata, registry data, program instruction data, middleware applicationtrace data, network management data such as management information basedata, email traffic data, and so forth.

A previous approach to unsupervised anomaly detection involves buildingprobabilistic models from the training data and then using them todetermine whether a given network data instance is an anomaly or not, asdiscussed in greater detail in E. Eskin, “Anomaly Detection Over NoisyData Using Learned Probability Distributions” (cited above). In thisalgorithm, a mixture model for explaining the presence of anomalies ispresented, and machine-learning techniques are used to estimate theprobability distributions of the mixture to detect the anomalies.

Another approach to intrusion detection uses distance-based outliers,and is discussed in greater detail in Edwin M. Knorr and Raymond T. Ng,“Algorithms For Mining Distance-Based Outliers in Large Datasets,” Proc.24th Int. Conf. Very Large Data Bases, VLDB, pages 392-403, 24-27, 1998;Edwin M. Knorr and Raymond T. Ng, “Finding Intentional Knowledge ofDistance-Based Outliers,” The YLDB Journal, pages 211-222, 1999; andMarkus M. Breunig, Hans-Peter Kriegel, Raymond T. Ng, and Jorg Sander,“LOF: Identifying Density-Based Local Outliers,” ACM SICMOD Int. Conf.on Management of Data, pages 93-104, 2000. These approaches examineinter-point distances between instances in the data to determine whichpoints are outliers. However, this approach was not used in the field ofintrusion detection, and therefore the analysis described in thesereferences was not applied to detect anomalies.

A limitation of these approaches is derived from the nature of theoutlier data. Often in network data, the same intrusion occurs multipletimes. Consequently, there may be many similar instances in the data.Accordingly, a system which looks at the distances between data pointsmay fail to detect several repeated intrusions as anomalies due to therelatively short distances between the data representing the multipleintrusions.

Accordingly, there exists a need in the art for a technique to detectanomalies in the operation of a computer system which can be performedover unlabeled data, and which can accurately detect many types ofintrusions.

SUMMARY OF THE INVENTION

An object of the present invention is to provide a technique fordetecting anomalies in the operation of a computer system by analyzingunlabeled data regardless of whether such data contains anomalies.

Another object of the present invention is to provide a technique fordetecting anomalies in the operation of a computer system whichimplicitly maps audit data in a feature space, and which identifiesanomalies based on the distribution of data in the feature space.

A further object of the present invention is to provide a technique fordetecting anomalies which operates in an efficient manner for a largevolume of data.

These and other objects of the invention, which will become apparentwith reference to the disclosure herein, are accomplished by a systemand methods for detecting an intrusion in the operation of a computersystem comprising receiving a set of data corresponding to a computeroperation and having a set or vector of features. Since the method is anunsupervised anomaly detection method, the set of data to be analyzedneed not be labeled to indicate an occurrence of an intrusion or ananomaly. The method implicitly maps the set of data instances to afeature space, and determines a sparse region in the feature space. Adata instance is designated as an anomaly if it lies in the sparseregion of the feature space.

According to an exemplary embodiment of the present invention, the stepof receiving a set of data instances having a set of features maycomprise collecting the set of data instances from an audit stream. Forexample, the method may comprise collecting a set of system call tracedata and/or a set of process traces. According to another embodiment,the method may comprise collecting a set of network connections recordsdata, which may comprise collecting a sequence of TCP packets. Thefeatures of the TCP packets may comprise, e.g., the duration of thenetwork connection, the protocol type, the number of bytes transferredby the connection, and an indication of the status of the connection,features describing the data contents of the packets, etc. Thealgorithms may be used on network management applications sniffingManagement Information Bases, or the like, middleware systems, and forgeneral applications that have audit sources, including large scaleddistributed applications.

The step of implicitly mapping the set of data instances may comprisenormalizing the set of data instances based on the values of the data.For example, the set of feature values of the data instances may benormalized to a number of standard deviations of the values of thefeature values of the data instances from the mean or average of thefeature values of the set of data instances. The step of implicitlymapping the set of data may comprise applying a convolution kernel tothe set of data. An exemplary convolution kernel may comprise a spectrumkernel, etc.

The step of determining a sparse region in the feature space may includeclustering the set of data instances. The clustering step may furthercomprise determining a distance, in the feature space, between aselected data instance and a plurality of clusters, and determining ashortest distance between the selected data instance and a selectedcluster in the set of clusters. The clustering step may further comprisedetermining a cluster width. If the shortest distance between theselected data instance and the selected cluster is less than or equal tothe cluster width, the selected data instance is associated with theselected cluster. If the shortest distance between the selected datainstance and the selected cluster is greater than the cluster width, theselected data instance is associated with a new cluster formed by theselected data instance. A further step may include determining apercentage of clusters having the greatest number of data instancesrespectively associated therewith. The percentage of clusters having thegreatest number of data instances may be labeled as “dense” regions inthe feature space and the remaining clusters may be labeled as “sparse”regions in the feature space. The step of determining a sparse region inthe feature space may comprise associating each data instance in the setof data with a respective cluster, e.g., data instances associated withclusters considered “sparse” regions may be considered “anomalous.”

In another embodiment, the step of determining a sparse region in thefeature space may comprise determining the sum of the distances betweena selected data instance and the k nearest data instances to theselected data instance, in which k is a predetermined value. The nearestcluster may be determined as the cluster corresponding to the shortestdistance between its respective center and the selected data instance.The determination of the nearest cluster may comprise determining thedistances from the selected data instance to the centers of each of theclusters of data, and determining a minimum distance therebetween.

For each data instance in the nearest cluster, the distance between theselected data instance and each data instance in the nearest cluster isdetermined. If the distance between a point in the nearest cluster isless than the minimum distance determined above, the point in thenearest cluster is labeled as one of the k nearest neighbors.Designating a data instance as an anomaly if it lies in the sparseregion of the feature space may comprise determining whether sum of thedistances to the k nearest neighbors of the selected data instanceexceeds a predetermined threshold.

According to another embodiment, the step of determining a sparse regionin the feature space may comprise determining a decision function toseparate the set of data instances from an origin. The step ofdesignating a data instance as an anomaly is performed based on thedecision function.

In accordance with the invention, the objects as described above havebeen met, and the need in the art for a technique to detect anomalies inthe operation of a computer system over unlabeled data, has beensatisfied.

BRIEF DESCRIPTION OF THE DRAWINGS

Further objects, features and advantages of the invention will becomeapparent from the following detailed description taken in conjunctionwith the accompanying figures showing illustrative embodiments of theinvention, in which:

FIG. 1 is a flow chart illustrating a first embodiment of the method inaccordance with the present invention.

FIG. 2 is a flowchart illustrating a portion of the method of FIG. 1 inaccordance with the present invention.

FIG. 3 is a flow chart illustrating a second embodiment of the method inaccordance with the present invention.

FIG. 4 is a flowchart illustrating a portion of the method of FIG. 3 inaccordance with the present invention.

FIG. 5 is a flow chart illustrating a third embodiment of the method inaccordance with the present invention.

FIG. 6 is a plot illustrating the results of the three embodiments ofthe method in accordance with the present invention.

Throughout the figures, the same reference numerals and characters,unless otherwise stated, are used to denote like features, elements,components or portions of the illustrated embodiments. Moreover, whilethe subject invention will now be described in detail with reference tothe figures, it is done so in connection with the illustrativeembodiments. It is intended that changes and modifications can be madeto the described embodiments without departing from the true scope andspirit of the subject invention as defined by the appended claims.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

According to the invention, a geometric framework for unsupervisedanomaly detection is described herein. This framework maps the data,denoted D, to a feature space which are points in

^(d), the d-dimensional space of real numbers. Points that are in sparseregions of the feature space are labeled as anomalies. The particularmethod to determine which points are in a sparse region of the featurespace is dependent on the specific algorithm within the framework thatis being used, as described in greater detail herein. However, ingeneral, the algorithms will detect anomalies because they will tend tobe distant from other points.

A major advantage of the framework described herein is its flexibilityand generality. The mappings of data to points in a feature space may bedefined to feature spaces that better capture intrusions as outliers inthe feature space. The mappings may be defined over any type of auditdata such as network connection records, system call traces, ManagementInformation Bases, Window registry data, or any audit sources formiddleware systems, and for audit data of general applications that haveaudit sources, including large scaled distributed applications. Once themapping is performed to the feature space, the same algorithm can beapplied to these different kinds of data. For network data, adata-dependent normalization feature map specifically designed foroutlier detection is described. For system call traces, a spectrumkernel feature map is applied. Using these feature maps, it is possibleto process both network data which is a vector of features and systemcall traces which are sequences of system calls using the samealgorithms.

Three embodiments of the exemplary method for detecting outliers in thefeature space are described herein. All of the algorithms are efficientand can deal with high dimensional data, which is a particularrequirement for the application of intrusion detection. The firstembodiment is a cluster-based algorithm. The second embodiment is ak-nearest neighbor-based algorithm. The third embodiment is a SupportVector Machine-based algorithm.

The three unsupervised anomaly detection algorithms were evaluated overtwo types of data sets, a set of network connections and sets of systemcall traces. The network data that was examined was from the KDD CUP 99data (as described in greater detail in The Third InternationalKnowledge Discovery and Data Mining Tools Competition Dataset“KDD99-Cup” as published on-linehttp://kdd.ics.uci.edu/databases/kddcup99/kddcup99.html, 1999, which isincorporated by reference in its entirety herein), an intrusion attackdata set which is well known in the art. The system call data set wasobtained from the 1999 Lincoln Labs DARPA Intrusion Detection Evaluation(as described in greater detail in R. P. Lippmann, R. K. Cunningham, D.J. Fried, I. Graf, K. R. Kendall, S. W. Webster, and M. Zissman, Resultsof the 1999 DARPA Off-Line Intrusion Detection Evaluation, SecondInternational Workshop on Recent Advances in Intrusion Detection (RAID1999), West Lafayette, Ind., 1999, which is incorporated by reference inits entirety herein), which is also well known in the art.

The novel unsupervised anomaly detection algorithms described hereinmake two assumptions about the data which motivate the general approach.The first assumption is that the number of normal instances vastlyoutnumbers the number of anomalies. The second assumption is that theanomalies themselves are qualitatively different from the normalinstances. The basic concept is that since the anomalies are bothdifferent from normal data and are rare, they will appear as outliers inthe data which can be detected. (Consequently, an intrusion that anunsupervised algorithm may have a difficulty detecting is a syn-floodDoS attack. Often under such an attack the number of instances of theintrusion may be comparable to the number of normal instances, i.e.,they may not be rare. The algorithms described herein may not labelthese instances as an attack because the region of the feature spacewhere they occur may be as dense as the normal regions of the featurespace.)

The unsupervised anomaly detection algorithms described herein areeffective, for example, in situations in which the assumptions hold overthe relevant data. For example, these algorithms may not be able todetect the malicious intent of someone who is authorized to use thenetwork and who uses it in a seemingly legitimate way. Detection may bedifficult because this intrusion is not qualitatively different fromnormal instances of the user. In the framework described herein, theseinstances would be mapped very close to each other in the feature spaceand the intrusion would be undetectable. However, in both of thesecases, more data may be associated or linked with the data, and mappingthis newly enriched data to another feature space may render these asdetectable anomalies. For example, features may be added describing thehistory of visits by the IP addresses used in the syn-flood attack, andin the latter case, features may be added describing the usage historyof the user, i.e. they may use the system legitimately but at odd hoursof the day when attacking the system.

One feature of the methods described herein is mapping the records fromthe audit stream to a feature space. The feature space is a vector spacetypically of high dimension. Inside this feature space, an assumption ismade that some probability distribution generated the data. It isdesirable to label the elements that are in low density regions of theprobability distribution as anomalies. However, the probabilitydistribution is typically not known. Instead, points that are in sparseregions of the feature space are labeled as anomalies. For each point,the point's location within the feature space is examined and it isdetermined whether or not the point lies in a sparse region of thefeature space. Exactly how this determination is made depends on thealgorithm being used, as described herein.

The choice of algorithm to determine which points lie in sparse regionsand the choice of the feature map is application dependent. However,critical to the practical use of these algorithms for intrusiondetection is the efficiency of the algorithms. This is because the datasets in intrusion detection are typically very large.

The data is collected from an audit stream of the system as is known inthe art. For example, one such concrete example of an audit stream maybe network packet header data (without the data payload of the networkpackets) that are “sniffed” at an audit point in the network. In onecase of auditing a network operations center for 72 hours using“tcpdump”, a common network audit utility function, generated 23gigabytes of data. Without loss of generality, this audit data ispartitioned into a set of data elements D={x₂, . . . }. The space of allpossible data elements is defined as the input (instance) space X.Hence, D⊂X. The parameters of the input space depend on the type of datathat is being analyzed. The input space can be the space of all possiblenetwork connection records, event logs, system call traces, etc.

The elements of the input space are mapped to points in a feature spaceY. In the methods in accordance with the present invention, a featurespace is typically a real vector space of some high dimension d,

^(d), or more generally, a Hilbert space, as is known in the art.

A feature map is defined as a function that takes as input an element inthe input space and maps it to a point in the feature space. In general,a feature map is defined as 0 to provide the following relationship:

φ: X→Y.   (1)

The term image of a data element x is used to denote the point in thefeature space φ (x).

Since the feature space is a Hilbert space, for any points y₁ and y₂their dot product <y₁, y₂> is defined. The notation <x, y> denotes thedot product of two (feature) vectors. The dot product is the sum of theproducts of the corresponding vector components of x and y. When thereis a space and an algebra where a dot product is defined, it ismathematically possible to define a “norm” on the space, as well as adistance between elements in the space. The norm of a point y in thefeature space ∥y∥ is the square root of the dot product of the pointwith itself, ∥y∥=√{square root over (<y, y>)}. Using this and the factthat a dot product is a symmetric bilinear form, the distance betweentwo elements of the feature space y₁ and y₂ is defined as follows:

${{y_{1} - y_{2}}} = {\sqrt{\langle{{y_{1} - y_{2}},{y_{1} - y_{2}}}\rangle} = {\sqrt{{\langle{y_{1},y_{1}}\rangle} - {2{\langle{y_{1},y_{2}}\rangle}} + {\langle{y_{2},y_{2}}\rangle}}.}}$

Using the framework in accordance with the present invention, thefeature map may be used to define relations between elements of theinput space. Given two elements in the input space x₁ and x₂, thefeature map may be used to define a distance between the two elements asthe distance between their corresponding images in the feature space.The distance function d_(φ) is defined as follows:

$\begin{matrix}{{d_{\varphi\square}( {x_{1},x_{2}} )} = {{{{\varphi {\square( x_{1} )}} - {\varphi {\square( x_{2} )}}}} = {\sqrt{{\langle{{\varphi ( x_{1} )},{\varphi ( x_{1} )}}\rangle} - {2{\langle{{\varphi ( x_{1} )},{\varphi ( x_{2} )}}\rangle}} + {\langle{{\varphi ( x_{2} )},{\varphi ( x_{2} )}}\rangle}}.}}} & (2)\end{matrix}$

For notational convenience, the subscript may be dropped from d₁₀₀ . Ifthe feature space is

^(d), this distance corresponds to standard Euclidean distance in thatspace.

In many cases, it is difficult to explicitly map a data instance to apoint in its feature space. One reason is that the feature space has avery high dimension which makes it difficult to explicitly store thepoints in the feature space because of memory considerations. In somecases, the explicit map may be very difficult to determine.

Accordingly, a kernel function is defined to compute these dot productsin the feature space. A kernel function is defined over a pair ofelements in the feature space and returns the dot product between theimages of those elements in the feature space. More formally, the kernelfunction is defined as follows:

K _(φ)(x ₁ , x ₂)=<φ(x ₁), φ(x ₂)>.   (3)

The distance measure (2) can be redefined through a kernel function as

d _(φ)(x ₁ , x ₂)=√{square root over (kφ(x ₁ , x ₁)−2Kφ(x ₁ , x ₂)+Kφ(x₂ , x ₂))}.   (4)

In many cases, the kernel function can be computed efficiently withoutexplicitly mapping the elements from the input space to their images. Afunction is a kernel function if (a) there exists a feature space whichis a Hilbert space and (b) for which the kernel function corresponds toa dot product. There are conditions on whether or not a function is akernel, which are well-known in the art, for example as described indetail in N. Cristianini and J. Shawe-Taylor. An Introduction to SupportVector Machines. Cambridge University Press, Cambridge, UK, 2000.

An example of a kernel that performs the mapping implicitly is the“radial basis kernel.” The radial basis kernel is a function of thefollowing form:

$\begin{matrix}{{K_{rb}( {x_{1},x_{2}} )} = ^{- {\{\frac{{{x_{1} - x_{2}}}^{2}}{\sigma^{2}}\}}}} & (5)\end{matrix}$

The radial basis kernel corresponds to an infinite dimensional featurespace, as is known in the art, and described in greater detail in N.Cristianini and J. Shawe-Taylor. An Introduction to Support VectorMachines. Cambridge University Press, Cambridge, UK, 2000.

In addition to the computational advantages of kernels, kernels can bedefined to take advantage of knowledge about the application. It ispossible to weight various features (components of data elements x₁ andx₂) higher or lower depending on their relative importance todiscriminate data based upon domain knowledge.

Although the examples of kernels that have been described herein havebeen defined over input spaces which are vector spaces, kernels may bedefined over arbitrary input spaces. These kinds of kernels are referredto as convolution kernels as is known in the art, and discussed ingreater detail in D. Haussler, “Convolution Kernels on DiscreteStructures,” Technical Report UCS-CRL-99-10, UC Santa Cruz, 1999; C.Watkins, “Dynamic Alignment Kernels,” in A. J. Smola, P. L. Bartlett, B.Schölkopf, and D. Schuurmans, editors, Advances in Large MarginClassifiers, pages 39-50, Cambridge, Mass., 2000. MIT Press, which areincorporated by reference in their entirety herein).

In accordance with the invention, kernels may be defined directly overthe audit data without needing to first convert the data into a vectorin

^(d). In addition, since kernels may be defined on not only numericalfeatures, but also on other types of structures, such as sequences,kernels may be defined to handle many different types of data, such assequences of system calls and event logs. This allows the methodsdescribed herein to handle different kinds of data in a consistentframework using different kernels but using the same algorithms whichare defined in terms of kernels.

After mapping the data to points in the feature space, the problem ofunsupervised anomaly detection may be formalized. An important featureis to detect points that are distant from most other points or inrelatively sparse regions of the feature space.

Three exemplary embodiments of the inventive techniques are describedherein for detecting anomalies in the feature space. All of thealgorithms may be implemented in terms of dot products of the inputelements, which allows the use of kernel functions to perform implicitmappings to the feature space. Each algorithm detects points that lie insparse regions.

The three exemplary algorithms are summarized herein: The firstembodiment 100 is a cluster-based algorithm. For each point, thealgorithm approximates the density of points near the given point. Thealgorithm makes this approximation by counting the number of points thatare within a sphere of radius w around the point. Points that are in adense region of the feature space and contain many points within thesphere are considered normal. Points that are in a sparse region of thefeature space and contain few points within the sphere are consideredanomalies. An efficient approximation to this algorithm is describedherein. First, a fixed-width clustering over the points with a radius ofw is performed. Then the clusters are sorted based on the size. Thepoints in the small clusters are labeled anomalous.

The second embodiment 200 detects anomalies based on a determination ofthe k-nearest neighbors of each point. If the sum of the distances tothe k-nearest neighbors is greater than a threshold, the point isconsidered an anomaly. An efficient algorithm to detect outliers isdescribed herein which uses a fixed-width clustering algorithm tosignificantly speed up the computation of the k-nearest neighbors.

The third embodiment 300 is a support vector machine-based algorithmthat identifies low support regions of a probability distribution bysolving a convex optimization problem as is known in the art. (Anexemplary convex optimization technique is discussed in B. Schölkopf, J.Platt, J. Shawe-Taylor, A. J. Smola, and R. C. Williamson, “Estimatingthe Support of a High-Dimensional Distribution,” Technical Report 99-87,Microsoft Research, 1999, to appear in Neural Computation, 2001, andwhich is incorporated by reference in its entirety herein). The pointsin the feature space are further mapped into another feature space usinga Gaussian kernel. In this second feature space, a hyperplane is drawnto separate the majority of the points away from the origin, as will bedescribed in greater detail herein. The remaining points represent theoutliers or anomalies.

The first algorithm 100 computes the number of points, i.e., instancesof data, which are “near” each point in the feature space, and isillustrated in FIGS. 1-2. A first step 102 is receipt of data from theaudit stream, which is described in greater detail below.

One parameter in the algorithm is a radius w, also referred to as the“cluster width.” For any pair of points x₁ and x₂, the two points areconsidered near each other if their distance is less than or equal to w,i.e., d(x₁, x₂)≦w with distance defined as in equation (2), above.

For a point x, the term N(x) is defined as the number of points that arewithin w of point x. More formally, N(x) is defined as follows:

N(x)={s d(x, s)≦w}.   (6)

The computation of N(x) for all points s has a complexity of O(n ²), inwhich n is the number of points. This level of complexity results fromthe fact that it is necessary to compute the pairwise distances betweenall points.

However, since an objective of the method is the identification ofpoints in sparse regions, the algorithm uses an effective approximationas follows: (1) The fixed-width clustering is performed over the entiredata set with cluster width w, and (2) the points in the small clustersare labeled as anomalies. Here the distance of each point is compared toa smaller set of cluster center points, not to all other points, thusreducing the computational complexity.

A fixed-width clustering algorithm is as follows: The first point ismade the center of the first cluster. For every subsequent point, if itis within w of a cluster center, it is added to that cluster. Otherwise,a new cluster is created with this point as the center of the newcluster. (Note that some points may be added to multiple clusters, whichis modified for embodiment 200, described below.) The fixed-widthclustering algorithm requires only one pass through the data. Thecomplexity of the algorithm is O(cn) where c is the number of clustersand n is the number of data points. For a reasonable w, c will besignificantly smaller than n.

Note that by the definition in equation (6), for each cluster, thenumber of points near the cluster center, N(c), is the number of pointsin the cluster c. For each point x, not a center of a cluster, N(x) isapproximated by N(c) for the cluster c that contains x. For points invery dense regions where there is a lot of overlap between clusters,this will be an inaccurate estimate. However, for points that areoutliers, there will be relatively few overlapping clusters in theseregions and N(c) will be an accurate approximation of N(x). Since theprimary interest of the algorithm is the points that are outliers, thepoints in the dense regions will be higher than the threshold anyway.Thus the approximation is reasonable for the purposes of the algorithm.

With the efficient approximation algorithm, it is possible to processsignificantly larger data sets than possible with the straightforwardalgorithm because it is unnecessary to perform a pairwise comparison ofpoints.

Further details of the cluster-based estimation algorithm 100 are givenherein. A next stage is the implicit mapping of the input data to thefeature space. In algorithm 100, the next stage 104 may be to performnormalization of the input data. Since the algorithm is designed to begeneral, it must be able to create clusters given a dataset from anarbitrary distribution. A problem with typical data is that differentfeatures are on different scales. This causes bias toward some featuresover other features. As an example, consider two 3-feature vectors, eachset coming from different distributions: {(1, 3000, 2), (1, 4000, 3)}.Under a Euclidean metric, the squared distance between feature vectorswill be (1−1)²+(3000−4000)²+(2−3)² which is dominated by the secondcolumn. To solve this problem, the data instances are converted to astandard form based on the training dataset's distribution. That is, anassumption is made that the training dataset accurately reflects therange and deviation of feature values of the entire distribution. Then,all data instances may be normalized to a fixed range, and hard codingof the cluster width may be performed based on this fixed range.

Given a training dataset, the average and standard deviation featurevectors are calculated:

${{avg\_ vector}\lbrack j\rbrack} = {\frac{1}{n}{\sum\limits_{i = 1}^{n}\; {{instance}_{i}\lbrack j\rbrack}}}$${{std\_ vector}\lbrack j\rbrack} = ( {\frac{1}{n - 1}{\sum\limits_{i = 1}^{n}( {{{instance}_{i}\lbrack j\rbrack} - {{avg\_ vector}\lbrack j\rbrack}} )^{2}}} )^{1/2}$

where vector [j] is the element (feature) of the vector. The termavg_vector refers to the vector of average component values, and theterm std_vector refers to the vector whose components are standarddeviations from the mean of the corresponding components. The terminstance refers to a data item from the training data set. The termnew_instance refers to a conversion of these data elements in thetraining set where their components are replaced by a measure of thenumber of standard deviations each component is from the mean valuepreviously computed.

Then each instance (feature vector) in the training set is converted asfollows:

${{new\_ instance}\lbrack j\rbrack} = \frac{{{instance}\lbrack j\rbrack} - {{avg\_ vector}\lbrack j\rbrack}}{{std\_ vector}\lbrack j\rbrack}$

In other words, for every feature value, it is calculated how manystandard deviations it is away from the average, and that result becomesthe new value for that feature. Only continuous features are convertedin this fashion; discrete ones are preserved as they are. In effect,this is a transformation of an instance from its own space to thestandardized space, based on statistical information retrieved from thetraining set.

One of the main assumptions made was that data instances having the samelabel will tend to be closer together than instances with differentlabels under some metric. In the exemplary embodiment, a standardEuclidean metric with equally weighted features is used.

Some features took on discrete values, and the metric that was usedadded a constant value to the squared distance between two instances forevery discrete feature where they had two distinct values. This isequivalent to treating each different value as being orthologous in thefeature space.

A subsequent step 106 in the exemplary method is to create clusters (seealso FIG. 2). To create the clusters from the input data instances,“single-linkage clustering” is used. The approach has an advantage ofworking in near linear time. The algorithm may begin with an empty setof clusters, and subsequently generates the clusters with a single passthrough the dataset. For each new data instance retrieved from thenormalized training set, it computes the distance between a data pointand each of the centroids of the clusters that exist at that point inthe computation. The cluster with the shortest distance is selected, andif that distance is less than some constant w (cluster width) then theinstance is assigned to that cluster. Otherwise, a new cluster iscreated with the instance as its center. More formally, the algorithmproceeds as follows:

Assume there is a fixed a metric M, and a constant cluster width w. Letd(C, x), where C is a cluster and x is an instance, be the distanceunder the metric M, between Cs defining instance and x. The defininginstance of a cluster is the feature vector that defines the center (infeature space) of that cluster. This defining instance is referred to asthe centroid. The process is re-stated herein:

At step 150, the set of clusters, S, is initialized to the empty setSubsequently, a data instance (having a feature vector) x is obtainedfrom the training set. If S is empty (i.e., the first data instance),then a cluster is created with x as the defining instance, and thisinstance is added to S (step 152). Next, create a loop for every datainstance x (step 154). A loop (step 156) is created to determine thedistance from each data instance x to each cluster C previously created(step 158). A next step is to find the cluster in S that is closest tothis instance (step 160). In other words, find a cluster C in S, suchthat for all C₁ in S, d(C, x)≦d(C₁, x). (Although loops are describedabove, it is understood that this process of analyzing every datainstance may be performed by other programming methods.)

A decision block (step 162) analyzes whether d(C, x)≦w. If so, then x isassociated with the cluster C (step 164). Otherwise, x is a distance ofmore than w away from any cluster in S, and so a new cluster must becreated for it: S←S∪{C_(n)} where C_(n) is a cluster with x as itsdefining instance (step 166). Loop 154 (steps 156-166) are repeateduntil no instances are left in the training set.

With continued reference to FIG. 1, a next step 108 is labeling theclusters. Under the above-described metric, instances with the sameclassification are close together and those with differentclassifications are far apart. If an appropriate cluster width w hasbeen chosen, then after clustering, a set of clusters may be obtainedwith instances of a single type in each of them. This corresponds to thesecond assumption about the data, i.e., that the normal and intrusioninstances are qualitatively different.

Since unsupervised anomaly detection deals with unlabeled data, there isno access to labels during training. Therefore, the algorithm usesanother approach to determine which clusters contain normal instancesand which contain attacks (anomalies). A first assumption about the datais that normal instances constitute an overwhelmingly large portion(>98%) of the training dataset. Under this assumption, it is highlyprobable that clusters containing normal data will have a much largernumber of instances associated with them than would clusters containinganomalies. Consequently some percentage P of the clusters containing thelargest number of instances associated with them are labeled as“normal.” The rest of the clusters are labeled as “anomalous” and areconsidered to contain attacks.

A potential problem may arise with this approach, however, depending onhow many sub-types of normal instances there are in the training set.For example, there may be many different kinds of normal networkactivity, such as using different protocols or services, e.g., ftp,telnet, www, etc. Each of these uses might have its own distinct pointin feature space where network data instances for that use will tend tocluster around. This, in turn, might produce a large number of such‘normal’ clusters, one for each type of normal use of the network. Eachof these clusters will then have a relatively small number of instancesassociated with it, and in certain cases less than some clusterscontaining attack instances. As a result, it is possible that thesenormal clusters will be incorrectly labeled as anomalous. To preventthis problem, the percentage of normal instances in the training setmust be sufficiently large in relation to the attacks. Then, it is verylikely that each type of normal network use will have adequate (andlarger) representation than each type or sub-type of attack.

Once the clusters are created from a training set, the system is readyto perform the next step, i.e., detection of intrusions. Given aninstance x, classification proceeds as follows:

At step 110, convert x based on the statistical information of thetraining set from which the clusters were created. (For example,conversion may refer to normalizing x to the mean and the standarddeviation.) Let x′ be the instance after conversion. A loop (step 112)is performed for each cluster C in S, in order to determine d(C, x′)(step 114). At step 116, the cluster which is closest to d′ under themetric M is determined (i.e., a cluster C in the cluster set, such thatfor all C^(n) in S, d(C, x′)≦d(C^(n), x′). The choice of the cluster isdetermined by checking the distance to each cluster and picking theminimum. This includes checking the distance to a number of points whichare the centers of the clusters. The number of points is the number ofclusters.

Subsequently, x′ is classified according to the label of C (either“normal” or “anomalous”). In other words, the algorithm finds thecluster that is closest to x (converted) and give it that cluster'sclassification. At step 118, it is ascertained whether the nearestcluster is labeled “normal.” If so, the data instance x′ is also labeled“normal” (step 120). Otherwise, the data instance x′ is labeled as an“anomaly” (step 122).

As illustrated in FIGS. 3-4, a second exemplary algorithm 200 of theinventive method determines whether or not a point lies in a sparseregion of the feature space by determining the sum of the distances tothe k-nearest neighbors of the point. This quantity is referred to asthe “k-NN” score for a point.

Intuitively, a point in a dense region will have many points near it,and thus the point will have a small k-NN score, i.e., a small distanceto the k-nearest neighbor. If the size of k, i.e., the number of nearestneighbors used in the evaluation, exceeds the frequency of any givenattack type in the data set, and the images of the attack elements arefar from the images of the normal elements, then the k-NN score isuseful for detecting these attacks.

A potential problem with determining the k-NN score is that it iscomputationally expensive to compute the k-nearest neighbors of eachpoint. The complexity of this computation is O(n²) which may beimpractical for certain intrusion detection applications since n=|D|,i.e., n is the size of the data which may be a very large number ofpackets.

Since the method of the invention is concerned with the k-nearest pointsto a given point, the algorithm operates by using a technique similar to“canopy clustering” (as discussed in greater detail in Andrew McCallum,Kamal Nigam, and Lyle H. Ungar. “Efficient Clustering ofHigh-Dimensional Data Sets with Application to Reference Matching,”Knowledge Discovery and Data Mining, pages 169-178, 2000, which isincorporated by reference in its entirety herein). Canopy clustering isused as a means of partitioning the space into smaller subsets, reducingthe need to check every data point. The clusters are used as a tool toreduce the time of finding the k-nearest neighbors.

The method is described herein: First, the data is received from theaudit stream (step 202) as described in greater detail below, andclustered using the fixed-width clustering algorithm as described above(step 204). Each element is placed into only one cluster. Step 204 issubstantially identical to the step 106, described above with thefollowing differences noted herein: Each element is placed into only onecluster. Once the data is clustered with width w, the k-nearestneighbors can be computed for a given point x by taking advantage of thefollowing properties:

The point which is the center of the cluster that contains a given pointx is denoted as C(x). For a cluster center C and a point x, the notationd(C, x) is used to denote the distance between the point and the clustercenter. For any two points x₁ and x₂, if the points are in the samecluster, the following relation holds:

d _(φ)(x ₁ , x ₂)≦2w   (7)

and in all cases

d _(φ)(x ₁ , x ₂)≦d _(φ)(x ₁ , c(x ₂))+w   (8)

d _(φ)(x ₁ , x ₂)≦d _(φ)(x ₁ , c(x ₂))−w   (9)

The algorithm uses these three inequalities to determine the k-nearestneighbors of a point x.

The algorithm proceeds as follows and is illustrated in FIG. 4. Let S bea set of clusters. Initially, S contains all of the clusters in thedata. At any step in the algorithm, there may be a set of points whichare potentially among the k-nearest neighbor points. This set is denotedas P. There is a set of points that is in fact among the k-nearestneighbor points. This set is denoted K. Initially, K and P are empty(step 250). The distance from data instance x to each cluster in S (step254) is precomputed in loop 252. The minimum distance between the datainstance x and each cluster is determined at step 256 (d_(min) isdefined in greater detail below). The cluster having its center closestto x is determined (step 258). For the cluster with center closest to x,its data is removed from S, and all of its points are added to P (step260). This operation is referred to as “opening” the cluster. By thismethod, a lower bound of the distance from all points in the clusters inset S can be obtained using equation (9), above. The minimum distance isdefined as follows:

$\begin{matrix}{d_{\min} = {{\underset{C \in S}{\min \;}{d( {C,x} )}} - w}} & (10)\end{matrix}$

The algorithm performs the following steps: A loop 262 is set up toevaluate each point in x_(i) ∈ P, to determine the distance d(x, x_(i))between data instance x and each data point x_(i) (step 264). If thecomputation determines that d(x, x_(i))<d_(min), then x_(i) isconsidered closer to x than all of the points in the clusters in S (step266). In other words, point x_(i) is considered a k-nearest neighbor. Inthis case, point x_(i) is removed from P and added to K (step 268). Ifthe computation determines that the distance d(x, x_(i))≧d_(min) for anyelement of P (including the case that if P is empty), then the nextclosest cluster is determined (step 270) and “opened” by adding all ofits points to P and removing that cluster from S (step 260). Thedistance from x to each cluster in S is recomputed. When the nextclosest cluster is removed from S, d_(min) will increase. Once K has kelements (step 272), this stage of the process is completed. The sum ofthe distances of the k-nearest neighbors is determined at step 208 (see,FIG. 3).

A significant portion of the computation is used to check the distancebetween points in D to the cluster centers. This is significantly moreefficient than computing the pairwise distances between all points.

The choice of width w does not affect the k-NN score, but instead onlyaffects the efficiency of computing the score. Intuitively, clusterwidth w is chosen to split the data into reasonably sized clusters. Asdetermined at step 210, if the sum of the distances to the k-nearestneighbors is less than or equal to a threshold, the point is considereda “normal” (step 212) and if the sum of the distances to the k-nearestneighbors is greater than a threshold, the point is considered an“anomaly” (step 214).

The third exemplary algorithm 300, illustrated in FIG. 5, uses analgorithm presented in greater detail in B. Schölkopf, J. Platt, J.Shawe-Taylor, A. J. Smola, and R. C. Williamson, “Estimating the Supportof a High-Dimensional Distribution,” Technical Report 99-87, MicrosoftResearch, 1999, to appear in Neural Computation, 2001, which is wellknown in the art and is incorporated by reference in its entiretyherein, to estimate the region of the feature space where most of thedata occurs. The algorithm receives data from an audit stream (step 302)as described in greater detail below. At step 304, the feature space isfirst mapped into a second feature space with a radial basis kernel,equation (5), and then subsequent calculations proceed in the newfeature space.

The standard SVM algorithm is a supervised learning algorithm as isknown in the art. It requires labeled training data to create itsclassification rule. In B. Schölkopf, et. al, incorporated by referenceabove, the SVM algorithm is adapted into an unsupervised learningalgorithm. This unsupervised variant does not require its training setto be labeled to determine a decision surface.

Whereas the supervised version of SVM tries to maximally separate twoclasses of data in feature space by a hyperplane, the unsupervisedversion instead attempts to separate the entire set of training datafrom the origin with a hyperplane (step 306). (As is well known in theart, the term origin refers to the point with coordinates (0,0,0, . . .0) in the feature space.) This is performed by solving a quadraticprogram that penalizes any points not separated from the origin whilesimultaneously trying to maximize the distance of this hyperplane fromthe origin. At the end of this optimization, this hyperplane then actsas the decision function, with those points that it separates from theorigin classified as “normal”(step 310) and those which are on the otherside of the hyperplane, are classified as “anomalous” (step 312).

The algorithm is similar to the standard SVM algorithm in that it useskernel functions to perform implicit mappings and dot products. It alsouses the same kind of hyperplane for the decision surface. The solutionis only dependent on the support vectors as well. However, the supportvectors are determined in a different way. In particular, this algorithmattempts to find a small region where most of the data lies and labelpoints in that region as “class +1.” Points in other regions are labeledas “class −1.” The algorithm attempts to find the hyperplane thatseparates the data points from the origin with maximal margin. Thedecision surface that is chosen is determined by solving an optimizationproblem that determines the “best” hyperplane under a set of criteriawhich are known in the art, and described for example, in N. Cristianiniand J. Shawe-Taylor, An Introduction to Support Vector Machines,Cambridge University Press, Cambridge, UK, 2000, which is incorporatedby reference in its entirety herein.

The specific optimization that is solved for estimating the hyperplanespecified by the hyperplane's normal vector in the feature space w andoffset from the origin ρ is

$\begin{matrix}{{{\min \mspace{14mu} \frac{1}{2}{w}^{2}} + {\frac{1}{vi}{\sum_{i}^{l}\zeta_{i}}} - \rho}{{w \in Y},{{\zeta \; i} \in },{\rho \in }}} & (11) \\{{{{subject}\mspace{14mu} {to}\text{:}\mspace{14mu} ( {w \cdot {\varphi ( x_{i} )}} )} \geq {\rho - \zeta_{i}}},{\zeta_{i} \geq 0}} & (12)\end{matrix}$

where 0<v<1 is a parameter that controls the trade-off betweenmaximizing the distance from the origin and containing most of the datain the region created by the hyperplane and corresponds to the ratio ofexpected anomalies in the data set. are slack variables that penalizethe objective function but allow some of the points to be on the otherwrong side of the hyperplane.

After the optimization problem is solved, the decision function for eachpoint x is

ƒ(x)=sgn((w·φ(x))−ρ  (13)

A Lagrangian is introduced and this optimization is rewritten in termsof the Lagrange multipliers α_(i) to represent the optimization as

minimize:

$\frac{1}{2}{\sum\limits_{i,j}\; {\alpha_{i}\alpha_{j}{K_{\varphi}( {x_{i},x_{j}} )}}}$

subject to:

${0 \leq \alpha_{i} \leq \frac{1}{vl}},{{\sum\limits_{i}\; \alpha_{i}} = 1}$

at the optimum, ρ can be computed from the Lagrange multipliers for anyx_(i) such that the corresponding Lagrange multiplier α_(i) satisfies

$0 < \alpha_{i} < \frac{1}{vl}$$\rho = {\sum\limits_{j}\; {\alpha_{j}{K_{\varphi}( {x_{j},x_{i}} )}}}$

In terms of the Lagrange multipliers, the decision function is

$\begin{matrix}{{f(x)} = {{{sgn}( {{\sum\limits_{i}\; {\alpha_{i}{K_{\varphi}( {x_{i},x} )}}} - \rho} )}.}} & (14)\end{matrix}$

One property of the optimization is that for the majority of the datapoints, α_(i) will be 0 which makes the decision function efficient tocompute.

The optimization is solved with a variant of the Sequential MinimalOptimization algorithm as is known in the art and described in greaterdetail in J. Platt, “Fast Training of Support Vector Machines UsingSequential Minimal Optimization,” In B. Scholkopf, C. J. C. Burges, andA. J. Smola, editors, Advances in Kernel Methods—Support VectorLearning, pages 185-208, Cambridge, Mass., 1999, MIT Press, which isincorporated by reference in its entirety herein. Details on theoptimization, the theory behind the relation of this algorithm and theestimation of the probability density of the original feature space, anddetails of the algorithm are known in the art and fully described in B.Schölkopf, et al., “Estimating the Support of a High-DimensionalDistribution, incorporated by reference above.

The choice of feature space for unsupervised anomaly detection isapplication-specific, and is now described in greater detail. Theperformance greatly depends on the ability of the feature space tocapture information relevant to the application. For optimalperformance, it is best to analyze the specific application and choose afeature space accordingly.

In several experiments, two data sets were analyzed. The first data setis a set of network connection records. This data set contains recordswhich contain 41 features describing a network connection. The seconddata set is a set of system call traces. Each entry is a sequence of allof the system calls that a specific process makes during its execution.

Two different feature maps were used for the different kinds of datathat were analyzed. For data which are records, a data-dependentnormalization kernel was used to implicitly define the feature map. Thisfeature map takes into account how abnormal a specific feature in arecord is when it performs the mapping.

For system call data where each trace is a sequence of system calls, astring kernel is applied over these sequences. The kernel used is calleda spectrum kernel which is known in the art and was previously used toanalyze biological sequences, as described in greater detail, e.g., inEleazar Eskin, Christina Leslie and William Stafford Noble, “TheSpectrum Kernel: A String Kernel for SVM Protein Classification,”Proceedings of the Pacific Symposium on Biocomputing (PSB-2002), Kauai,Hi., 2002, which is incorporated by reference in its entirety herein.The spectrum kernel maps short sub-sequences of the string into thefeature space, which is consistent with the practice of using shortsub-sequences as the primary basis for analysis of system callsequences, as described in greater detail in e.g., Stephanie Forrest, S.A. Hofmeyr, A. Somayaji, and T. A. Longstaff, “A Sense of Self for UNIXProcesses,” 1996 IEEE Symposium on Security and Privacy, pages 120-128.IEEE Computer Society, 1996; W. Lee, S. J. Stolfo, and P. K. Chan,“Learning Patterns From UNIX Processes Execution Traces For IntrusionDetection,” AAAI Workshop on AI Approaches to Fraud Detection and RiskManagement, pages 50-56. AAAI Press, 1997; Eleazar Eskin, Wenke Lee, andSalvatore J. Stolfo. “Modeling System Calls for Intrusion Detection withDynamic Window Sizes,” Proceedings of DARPA Information SurvivabilityConference and Exposition II (DISCEX II), Anaheim, Calif., 2001, andU.S. application Ser. No. 10/208,402 filed Jul. 30, 2002 entitled“SYSTEM AND METHODS FOR INTRUSION DETECTION WITH DYNAMIC WINDOW SIZES,”which are incorporated by reference in their entirety herein.

For data which is a network connection record, a data-dependentnormalization feature map is used. This feature map takes into accountthe variability of each feature in the mapping in such a way thatnormalizes the relative distances between feature values in the featurespace.

There are two types of attributes in a connection record. There areeither numerical attributes or discrete attributes. Examples ofnumerical attributes in connection records are the number of bytes in aconnection or the number of connection attempts to the same port. Anexample of discrete attributes in network connection records is the typeof protocol used for the connection. Some attributes that appear to benumerical are in fact discrete values, such as the destination port of aconnection. Discrete and numerical attributes are handled differently inthe kernel mapping.

One potential problem with the straightforward mapping of the numericalattributes is that they may be on different scales. If a certainattribute is a hundred times larger than another attribute, it willdominate the second attribute. All of the attributes are normalized tothe number of standard deviations away from the mean. This scales thedistances based on the likelihood of the attribute values. This featuremap is data dependent because the distance between two points depends onthe mean and standard deviation of the attributes which in turn dependson the distribution of attribute values over all of the data.

For discrete values, a similar data dependent concept is used. Let Σ_(i)be the set of possible values for discrete attribute i. For eachdiscrete attribute there are |Σ_(i)| coordinates in the feature spacecorresponding to this attribute. There is one coordinate for everypossible value of the attribute. A specific value of the attribute getsmapped to the feature space as follows. The coordinate corresponding tothe attribute value has a positive value

$\frac{1}{\sum_{i}}$

and the remaining coordinates corresponding to the feature have a valueof 0. The distance between two vectors is weighted by the size of therange of values of the discrete attributes. A different value forattribute i between two records will contribute

$\frac{2}{{\sum_{i}}^{2}}$

to the square of the norm between the two vectors.

Convolution kernels can be defined over arbitrary input spaces. A kernelis defined over sequences to model sequences of system calls is used.The specific kernel used in the exemplary embodiment is a spectrumkernel which has been successfully applied to modeling biologicalsequences, as described in Eskin et. al, “The Spectrum Kernel: A StringKernel for SVM Protein Classification,” above.

The spectrum kernel is defined over an input space of sequences. Thesesequences can be an arbitrary long sequence of elements from an alphabetΣ. For any k>0, the feature space of the k-spectrum kernel is defined asfollows. The feature space is a |Σ|^(k) dimensional space where eachcoordinate corresponds to a specific k length sub-sequence. For a givensequence, the value of a specific coordinate of the feature space is thecount of the number of times the corresponding sub-sequence occurs inthe sequence. These sub-sequences are extracted from the sequence byusing a sliding window of length k.

The dimension of the feature space is exponential in k which may make itimpractical to store the feature space explicitly. Note that the featurevectors corresponding to a sequence are extremely sparse. Accordingly,the kernels may be efficiently computed between sequences using anefficient data structure as is known in the art and described in Eskinet al., “The Spectrum Kernel: A String Kernel for SVM ProteinClassification,” cited above. For example, in one of the experiments 26possible system calls and sub-sequences of length 4 are considered,which gives a dimension of the feature space of close to 500,000.

Experiments were performed over two different types of data. Networkconnection records and system call traces were analyzed.

To evaluate the system two major indicators of performance wereconsidered: the detection rate and the false positive rate. Thedetection rate is defined as the number of intrusion instances detectedby the system divided by the total number of intrusion instances presentin the test set. The false positive rate is defined as the total numberof normal instances that were (incorrectly) classified as intrusionsdivided by the total number of normal instances. These are goodindicators of performance, since they measure what percentage ofintrusions the system is able to detect and how many incorrectclassifications it makes in the process. These values are calculatedover the labeled data to measure performance.

The trade-off between the false positive and detection rates isinherently present in many machine-learning methods. By comparing thesequantities against each other, it is possible to evaluate theperformance invariant of the bias in the distribution of labels in thedata. This is especially important in intrusion-detection problemsbecause the normal data outnumbers the intrusion data by a factor of100:1. The classical accuracy measure is misleading because a systemthat always classifies all data as normal would have a 99% accuracy.

ROC (Receiver Operating Characteristic) curves, as described in greaterdetail in Foster Provost, Tom Fawcett, and Ron Kohavi, “The Case AgainstAccuracy Estimation for Comparing Induction Algorithms, Proceedings ofthe Fifteenth International Conference on Machine Learning, July 1998,depicting the relationship between false positive and detection ratesfor one fixed training/test set combination. ROC curves are a way ofvisualizing the trade-offs between detection and false positive rates.

The network connection records used were the KDD Cup 1999 Data describedabove, which contained a wide variety of intrusions simulated in amilitary network environment. It consisted of approximately 4,900,000data instances, each of which is a vector of extracted feature valuesfrom a connection record obtained from the raw network data gatheredduring the simulated intrusions. A connection is a sequence of TCPpackets to and from some IP addresses. The TCP packets were assembledinto connection records using the Bro program, as described in greaterdetail in V. Paxson. “Bro: A System for Detecting Network Intruders inReal-Time,” Proceedings of the 7th USENIX Security Symposium, SanAntonio, Tex., 1998, modified for use with MADAM/ID, as described ingreater detail in W. Lee, S. J. Stolfo, and K. Mok. “Data Mining in WorkFlow Environments: Experiences in Intrusion Detection,” Proceedings ofthe 1999 Conference on Knowledge Discovery and Data Mining (KDD-99),1999. Each connection was labeled as either normal or as exactly onespecific kind of attack. All labels are assumed to be correct.

The simulated attacks fell in one of the following four categoriesDOS—Denial of Service (e.g. a syn flood), R2L—Unauthorized access from aremote machine (e.g. password guessing), U2R—unauthorized access tosuperuser or root functions (e.g. a buffer overflow attack), andProbing—surveillance and other probing for vulnerabilities (e.g. portscanning). There was a total of 24 attack types.

The extracted features included the basic features of an individual TCPconnection such as its duration, protocol type, number of bytestransferred, and the flag indicating the normal or error status of theconnection. Other features of an individual connection were obtainedusing some domain knowledge, and included the number of file-creationoperations, number of failed login attempts, whether root shell wasobtained, and others. Finally, there were a number of features computedusing a two-second time window. These included the number of connectionsto the same host as the current connection within the past two seconds,percent of connections that have “SYN” and “REJ” errors, and the numberof connections to the same service as the current connection within thepast two seconds. In total, there are 41 features, with most of themtaking on continuous values.

The KDD data set was obtained by simulating a large number of differenttypes of attacks, with normal activity in the background. The goal wasto produce a good training set for learning methods that use labeleddata. As a result, the proportion of attack instances to normal ones inthe KDD training data set is very large as compared to data that may beexpected in practice. Unsupervised anomaly detection algorithms aresensitive to the ratio of intrusions in the data set. If the number ofintrusions is too high, each intrusion will not show up as anomalous. Inorder to make the data set more realistic, many of the attacks werefiltered so that the resulting data set consisted of 1 to 1.5% attackand 98.5 to 99% normal instances.

The system call data is from the BSM (Basic Security Module) dataportion of the 1999 DARPA Intrusion Detection Evaluation data created byMIT Lincoln Labs, as is known in the art, and described in greaterdetail in R. P. Lippmann, R. K. Cunningham, D. J. Fried, I. Graf, K. R.Kendall, S. W. Webster, and M. Zissman, “Results of the 1999 DARPAOff-Line Intrusion Detection Evaluation,” Second International Workshopon Recent Advances in Intrusion Detection (RAID 1999), West Lafayette,Ind., 1999. The data consists of five weeks of BSM data of all processesrun on a Solaris machine. Three weeks of traces of the programs whichwere attacked during that time were examined. The programs examined wereeject and ps.

Each of the attacks that occurred correspond to one or more processtraces. An attack can correspond to multiple process traces because amalicious process can spawn other processes. The attack was considereddetected if one of the processes that correspond to the attack isdetected.

Table 1 summarizes the system call trace data sets and lists the numberof system calls and traces for each program.

TABLE 1 Program Total # # Intrusion # Intrusion # Normal # Normal %Intrusion Name of Attacks Traces System Calls Traces System Calls TracesPS 3 21 996 208 35092 2.7% eject 3 6 726 7 1278 36.3%

For each of the data sets, the data was divided into two portions. Oneportion, the training set, was used to set parameters values for ouralgorithms and the second, the test set, was used for evaluation.Parameters were set based on the training set. Then for each of themethods over each of the data sets, the detection threshold was variedand at each threshold the detection rate and false positive rate werecomputed. For each algorithm over each data set an ROC curve wasobtained.

The parameter settings are as follows. For the cluster-based algorithm100, when processing the network connection data, the width of thefixed-width clustering was set to be 40 in the feature space. For theeject system call traces, the width was set to be 5. For the ps traces,the width was set to be 10.

For the k-nearest neighbor-based algorithm 200, for the KDD cup data,the value of k was set to 10,000. For the eject data set, k=2 and forthe ps data set, k=15. The value of k is adjusted to the overall size ofthe data.

For the SVM-based algorithm 300 for the KDD cup data, the followingvalues were set: v=0.01 and σ²=12. For the system call data sets, valuesof v=0.05 and σ²=1 were used. (The parameters were used above, in whichv is the control parameter, and σ² is the tuning parameter.)

The analysis was performed on a computer system, such as a standard PCrunning the UNIX operating system. The algorithms described herein mayalso be used in a special purpose device with general computationalcapabilities (cpu and memory) such as a network interface card (e.g., anIntel™IXP 1200) or a network router appliance (such as a CISCO™ routeras a functional blade) or an intrusion detection appliance (such as NFRNIDS).

In the case of the system call data, each of the algorithms describedabove performed perfectly. Thus, at a certain threshold, there was atleast one process trace from each of the attacks identified as beingmalicious without any false positives. One possible explanation forthese results, without limiting the foregoing, may be obtained bylooking at exactly what the feature space is encoding. Each system calltrace is mapped to a feature space using the spectrum kernel thatcontains a coordinate for each possible sub-sequence. Process tracesthat contain many of the same sub-sequences of system calls are closertogether than process traces that contain fewer sub-sequences of systemcalls.

For the network connections, the data is not nearly as regular as thesystem call traces. From the experiments, there were some types ofattacks that were able to be detected well and other types of attacksthat were not able to be detected. One possible explanation, withoutlimiting the foregoing, is that some of the attacks using the featurespace were in the same region as normal data. Although the detectionrates are lower than what is typically obtained for either misuse orsupervised anomaly detection, the problem of unsupervised anomalydetection is significantly harder because there is no access to thelabels or a guaranteed clean training set.

FIG. 6 shows the performance of the three algorithms over the KDD Cup1999 data. Table 2 shows the Detection Rate and False Positive Rate forsome selected points from the ROC curves for the embodiments 100(clustering), 200 (k-nearest neighbor), and 300 (SVM) described herein.All three algorithms perform relatively close to each other.

TABLE 2 Algorithm Detection rate False positive rate Cluster 100 93% 10% Cluster 100 66%   2% Cluster 100 47   % Cluster 100 28%  .5% K-NN200 91%   8% K-NN 200 23%   6% K-NN 200 11%   4% K-NN 200  5%   2% SVM300 98%  10% SVM 300 91%   6% SVM 300 67%   4% SVM 300  5%   3%

It will be understood that the foregoing is only illustrative of theprinciples of the invention, and that various modifications can be madeby those skilled in the art without departing from the scope and spiritof the invention.

APPENDIX

The software listed herein is provided in an attached CD-Rom. Thecontents of the CD-Rom are incorporated by reference in their entiretyherein.

A portion of the disclosure of this patent document contains materialwhich is subject to copyright protection. The copyright owner has noobjection to the facsimile reproduction by any one of the patentdisclosure, as it appears in the Patent and Trademark Office patentfiles or records, but otherwise reserves all copyright rightswhatsoever.

1.0 Clustering System

Step 1. Setting up. To use the system for detecting network intrusions,the training data must be in the proper format. Data should be in theKDD format. (See Section 1.2 KDD Format, below.) The training data isorganized as follows: Choose a root name (root). Then put the attributeinformation in root.names and the actual instance data into root.data.

Step 2. Converting the data. The data should be converted intonormalized format before the system can cluster it. To do this, theconversion program should be run by typing:

-   -   java conv [root]        where [root] is the data's root name. This step will produce two        files: root.conv and root.stat. The file root.conv contains the        converted data, which will be used for clustering. The file        root.stat contains statistical information gathered about the        data (average and standard deviation).

Step 3. Clustering: To perform the actual clustering, the clusteringprogram should be run:

-   -   java clst [root]        This step will produce a root.cls file, which is a binary file        containing the saved clusters. The .cls file is actually a        serialized saved copy of the clusters and the clustering class.        Note, that for this step the following files must be present:    -   root.names    -   root.conv    -   root.stat

If it is desired to modify how the program clusters the data (includingchanging the metric, cluster method, cluster method parameters), theclst.java program may be modified. (See the Section 1.3 below.)

Detecting anomalies or intrusions: Once the training data has beenclustered, the system can be used to classify data instances (having thesame number and types of attributes as the training data). For anexample of detecting anomalies, see the file test1.java. That programtakes as parameters the name of the .cls (saved cluster information)file, and the root name of the data to be classified (detectanomalies/intrusions in), and performs the following:

-   -   Creates an InstanceReader object to read the data to classify.

InstanceReader Inst reader=new DefaultInstReader(root, root+“.data”);

-   -   Loads the clusters (deserializes a TCluster object).

TCluster clusters=TCluster.load(clsfile);

-   -   Labels the clusters based on number of instances in them (here        it labels the largest 10% of all clusters)

clusters.label_clusters(10);

-   -   Retrieves the average and standard deviation information from        the clusters (this is the average and standard deviation of the        training data from which the clusters were created). This is        needed to convert the instances that are to be classified next.

Inst avg_inst=clusters.avg_Inst;

Inst std_inst=clusters.std_inst;

-   -   Reads instances one by one, until the end of file.

Inst inst=inst_reader. read_next_instance( );

if(inst==null)break;

-   -   Converts those instances based on the average and standard        deviation information.

inst=conv.convert(inst,avg_inst,std_inst);

-   -   And finally, asks the clusters to classify the instance as an        anomaly or not

int c=clusters.is_anomaly(inst);

The implementation may of course differ, in that, for example, instancesmay be classified in real-time as they arrive from the network, insteadof reading the from a file. In this case, the parse_inst function ofDefaultInstanceReader class may be used to return an Inst object from astring representation (comma delimited, in KDD format) of an instance.

1.2 KDD Format.

Data file: A data file in the KDD is basically a text file that has adata instance on each line. Each data instance is a comma delimited setof values (one value for every attribute). The last value on the linemust be the classification, followed by a period. For example, here arethe first few lines from a sample data file:

-   -   0,tcp,http, SF,181,7051,2,2,19,255,normal.    -   0,tcp,http,SF,183,2685,12,12,29,255,normal.    -   0,udp,private,SF,105,146,45,1,255,255,normal.        If the classification is not known, then there should be at        least one # character before the final period. For example:    -   0,udp,private,SF,105,146,45,1,255,255,#.

Attribute (.names) file An attribute file specifies the names and typesof attributes for the instances in the data. The first line is a commadelimited line of the possible classification values. The next linescontain the attribute descriptions in this format:

<attribute_name>: <type>. (:<weight>)

The type may be either “symbolic” or “continuous”. The optional weightparameter is the weight of this attribute. It should be a positive realnumber. If it is not specified, the default weight is 1.00.

Here is an example attribute description (.names) file:

-   -   back,buffer_overflow,ftp_write    -   duration: continuous.:.4    -   protocol_type: symbolic.    -   service: symbolic.    -   flag: symbolic.:    -   src_bytes: continuous.    -   dst_bytes: continuous.:.1    -   land: symbolic.    -   wrong_fragment: continuous.:.9

1.3 Descriptions of the Classes

Inst and Attr classes: The Inst class, located in Inst.java, is thecontainer class for a single data instance. When data in KDD format isread from a file, the DefaultInstanceReader class (described below)parses each line in the file and returns an Inst object for it.

To parse the lines and to create those Inst objects, it also requiresinformation about the attributes of the data instances. The containerfor this information is the Attr class—it stores the attributes' namesand types. This information is obtained from the .names file (byDefaultInstanceReader (see below) upon construction).

InstanceReader interface and the DefaultInstReader class: Both theInstanceReader interface and the DefaultInstanceReader class are locatedin InstanceReader Java.

The InstanceReader interface is used for reading in the data. Itsdefinition provides the methods and their descriptions. There aremethods for reading in the next instance, for resetting back to thebeginning of file, for getting the Attr object with the attributesinformation, and for getting statistical information (this will returnvalid information only if .stat file is present—which is generated byConv.java program).

The DefaultInstReader class is a default implementation of theInstanceReader interface. It reads the data stored in KDD format, withthe root.data (root.conv), root.names, and root.stat files present. Touse it, construct it by passing the ‘root’ name for the data, and thename of the file containing the actual instance data (should either beroot.data or root.conv). For example, if the root name is “training”,and the data was already converted into normalized format (so that the“training.conv” and “training.stat” file are created), the object may beconstructed as below:

-   -   InstanceReader reader=new    -   DefaultInstReader(“training”,“training.conv”);

Getting an Inst object from a string representation of a singleinstance: Sometimes (e.g., during detection phase in real time), itmight be necessary to get a single Inst object from a stringrepresentation of a single instance in the standard KDD format. To dothis, the static parse_inst( ) method of DefaultInstanceReader is used.Pass to it the following: the string representation and the attributesobject for the data.

The TCluster class: The TCluster class, located in cl.java, is the baseclass for all the clustering algorithm classes. It contains methods forcreating clusters out of the data, for labeling the clusters, and forclassifying an instance as an anomaly or not based on the clusters.

It is an abstract class because the implementation of how clusteringwill be performed is up to the concrete derived class. The abstractmethod ‘void cluster_instances(InstanceReader reader)’ must beoverridden by the derived class to implement its own clusteringbehavior.

The SLCluster class: The SLCluster class, located in SLCluster.java,implements Single Linkage clustering. To use it, construct it by passinga Metric to use, and the width of the clusters. (The Metric interfacewill be described below.) An example is provided below:

TCluster clusters=new SLCluster(new Std_metric( ), 1.00);

The KMCluster class: The KMCluster class, located in KMCluster.java,implements K-means clustering. To use it, construct it by passing aMetric to use, the value of K (i.e., the number of clusters), and thenumber of maximum iterations to do. If the maximum iterations parameteris negative, iterations will be performed until no changes in the Kclusters occur between iterations. An example is provided below:

TCluster clusters=new KMCluster(new Std_metric( ), 100, 70);

Once the TCluster object is created, it can be used to create clustersand classify instances. Below are several methods of the TCluster class:

-   -   public void do_clustering(InstanceReader reader) throws        IOException        This method is called to create the clusters. Pass in an        instance reader for reading the instances.    -   public static TCluster load(String name)    -   public void save(String name)        Once the clusters have been created, they may be saved to a file        (by serialization) and loaded in. The above methods do that (the        name parameter is the file name to save to or load from).    -   public void label_clusters(int pct_biggest)        To proceed to the detection phase, and use the cluster        information, the above method is called to label the clusters as        either anomalous or non-anomalous (normal). The pct_biggest        argument specifies the percent of the biggest clusters (biggest        in terms of the number of instances in them) that should be        labeled as normal. For example label_clusters(10), specifies        that 0.1 of the biggest clusters will be normal, and so any        instance that will be nearest to any one of them will also be        considered normal. All the other clusters will be labeled        anomalous.    -   public int is_anomaly(Inst inst)        Finally, an instance may be classified an anomaly or not. An        instance is passed to the method above, and it will return “1”        if it classifies the instance as an anomaly, and “0” otherwise.        (Note that the instance must be converted to normalized form        before passing it to this method.) See the section “Cony Class”        below for information on how to convert it.

Metric interface and the Std_metric class Both of the above are definedin Metric.java. The Metric interface must be passed to the clusteringalgorithm, so that it will know how to compute distances betweeninstances. The interface defines just one method:

-   -   public double Calc_Distance(Inst a,Inst b);        It should return the square of the distance between the two        passed instances. A default implementation of the Metric        interface is provided by the Std_metric class. It treats        instances as data points in an n-coordinate space (where n is        the number of attributes), and computes the Euclidean distance        between them. The ‘difference’ between two values of a symbolic        attribute is set to be 1.00 if they are different and 0.00 if        they are the same.

Different attributes might also be weighted differently, in whichStd_metric multiplies the difference for each attribute by therespective weight.

Conv class The Conv class handles conversion of instance data intonormalized form. It includes a main( ) method, so it is a standaloneprogram. See Section 1.0 for information on using this program. It alsoincludes a method for converting a single instance to a normalized form.If the instances are being read from non-normalized data, then they mustbe converted before calling the is_anomaly( ) method of TCluster class.To do this, call the following static function of Conv class:

-   -   static Inst convert(Inst inst, Inst avg_inst, Inst std_inst)        The first parameter is the instance you want to convert, and the        second and third parameters are the average and standard        deviation of the data which was used to obtain the clusters. To        obtain them, retrieve them from the TCluster object loaded from        the saved clusters data. For example, if ‘clusters’ was the name        of the TCluster object that was loaded, then    -   Inst avg_inst=clusters.avg_inst;    -   Inst std_inst=clusters.std_inst;        would obtain the instances containing the average and standard        deviation information needed. See the test1.java program for an        example of doing this.

Examples The programs clst.java and test1.java, described above, provideexamples of using the classes described above. The ‘clst’ program takesthe data and clusters it, and saves the clusters information in a file.The ‘test1’ program loads the saved clusters and classifies instancesusing them.

2.0 k-Nearest Neighbor Algorithm

The routines in the attached files knn.cpp and knn.h perform the knearest neighbor routine substantially as described above concerningembodiment 200.

3.0 SVM Algorithm

Description of contents of one_class_svm: B. Schölkopf, J. Platt, J.Shawe-Taylor, A. J. Smola, and R. C. Williamson. Estimating the supportof a high-dimensional distribution. Technical Report 99-87, MicrosoftResearch, 1999. To appear in Neural Computation, 2001. Section 4, pages9-11, are basically what svm.c implements, with some modification forunsupervised anomaly detection as described hereinabove.

Directory: vector/ takes feature vectors of the data as input. Thefollowing files are located in the directory vector:

vector/data/train_kdd_10000: 9999 feature vectors of 41 features each,with a classification, used for training

vector/data/test_kdd_10000: 9999 feature vectors of 41 features each,with a classification, used for testing

vector/result/kdd_05_12_000001: Output of the svm, given a certain V andC (kernel width—note that this is defined differently in the code thanin the equations above) False Positive Rate and Detection Rate given aspecified threshold

vector/Makefile: Used to compile svm.c

vector/run: Used to run svm over certain data with certain parameters ofV and C (kernel width), and precision

vector/svm.c: The C source code which, when compiled, computes a singleclass svm over the training data and classifies the testing data, andoutputs the results: False Positive Rate and Detection Rate for acertain threshold. (Run with no arguments for more explanation ofcommand line options)

Directory: matrix/ takes a pre-computed kernel matrix as input. Thefollowing files are located in the directory matrix:

matrix/data/eject.dat: Pre-computed kernel matrix of eject data

matrix/data/ftpd.dat: Pre-computed kernel matrix of ftpd data

mattix/data/ps.dat: Pre-computed kernel matrix of ps data

matrix/result/eject.svm: For eject data. Output of the svm, given inputdata and a certain V (C not necessary since kernel is already computed)Distance of each data point from the hyperplane given a specifiedthreshold

matrix/result/eject.raw: As above, with labels

matrix/result/eject.roc: Points of the ROC curve given eject.raw as datapoints

matrix/result/ftpd.svm: For ftpd data. Output of the svm, given inputdata and a certain V (C not necessary since kernel is already computed)Distance of each data point from the hyperplane given a specifiedthreshold

matrix/result/ftpd.raw: As above, with labels

matrix/result/ftpd.roc: Points of the ROC curve given ftpd.raw as datapoints

matrix/result/ps.svm: For ps data. Output of the svm, given input dataand a certain V (C not necessary since kernel is already computed)Distance of each data point from the hyperplane given a specifiedthreshold

matrix/result/ps.raw: As above, with labels

matrix/result/ps.roc: Points of the ROC curve given ps.raw as datapoints

matrix/Makefile: Used to compile svm_matrix.c

matrix/run: Used to run svm over certain data with certain parameters ofV and C (kernel width), and precision

matrix/svm_matrix.c: The C source code which, when compiled, computes asingle class svm using the kernel matrix. It then runs the matrix overthe computed svm again and calculates and outputs the distance of eachdata point from the hyperplane. (Run with no arguments for moreexplanation of command line options)

Name Modified Size Packed Path Root Dec. 4, 2002 3:41 PM 17 17 ml\CVS\Repository Dec. 4, 2002 3:41 PM 3 3 ml\CVS\ Entries Dec. 5, 2002 12:56PM 20 20 ml\CVS\ knn.cpp Dec. 4, 2002 5:14 PM 13,630 13,630 ml\knn\knn.h Dec. 4, 2002 5:14 PM 1,889 1,889 ml\knn\ Root Dec. 5, 2002 12:57PM 17 17 ml\one_class_svm\. . .\CVS\ Repository Dec. 5, 2002 12:57 PM 2121 ml\one_class_svm\. . .\CVS\ Entries Dec. 5, 2002 1:00 PM 91 91ml\one_class_svm\. . .\CVS\ eject.dat Dec. 4, 2002 11:00 PM 1,140 1,140ml\one_class_svm\. . .\data\ ftpd.dat Dec. 4, 2002 11:00 PM 6,880,7946,880,794 ml\one_class_svm\. . .\data\ ps.dat Dec. 4, 2002 11:00 PM280,093 280,093 ml\one_class_svm\. . .\data\ Root Dec. 5, 2002 12:58 PM17 17 ml\one_class_svm\. . .\CVS\ Repository Dec. 5, 2002 12:58 PM 29 29ml\one_class_svm\. . .\CVS\ Entries Dec. 5, 2002 1:00 PM 124 124ml\one_class_svm\. . .\CVS\ Makefile Dec. 4, 2002 11:00 PM 1,291 1,291ml\one_class_svm\. . .\matrix\ eject. raw Dec. 4, 2002 11:00 PM 163 163ml\one_class_svm\. . .\rslt\ eject.roc Dec. 4, 2002 11:00 PM 23 23ml\one_class_svm\. . .\rslt\ eject.svm Dec. 4, 2002 11:00 PM 143 143ml\one_class_svm\. . .\rslt\ ftpd.raw Dec. 4, 2002 11:00 PM 12,56612,566 ml\one_class_svm\. . .\rslt\ ftpd.roc Dec. 4, 2002 11:00 PM 14 14ml\one_class_svm\. . .\rslt\ ftpd.svm Dec. 4, 2002 11:00 PM 12,50112,501 ml\one_class_svm\. . .\rslt\ ps.raw Dec. 4, 2002 11 :00 PM 2,7762,776 ml\one_class_svm\. . .\rslt\ ps. MC Dec. 4, 2002 11:00 PM 27 27ml\one_class_svm\. . .\rslt\ ps.svm Dec. 4, 2002 11:00 PM 2,772 2,772ml\one_class_svm\. . .\rslt\ Root Dec. 5, 2002 12:58 PM 17 17ml\one_class_svm\. . .\CVS\ Repository Dec. 5, 2002 12:58 PM 29 29ml\one_class_svm\. . .\CVS\ Entries Dec. 5, 2002 1:00 PM 368 368ml\one_class_svm\. . .\CVS\ run Dec. 4, 2002 11:00 PM 99 99ml\one_class_svm\. . .\matrix\ svm_matrix.c Dec. 4, 2002 11:00 PM 18,70718,707 ml\one_class_svm\. . .\matrix\ Root Dec. 5, 2002 12:57 PM 17 17ml\one_class_svm\. . .\CVS\ Repository Dec. 5, 2002 12:57 PM 24 24ml\one_class_svm\. . .\CVS\ Entries Dec. 5, 2002 1:00 PM 144 144ml\one_class_svm\. . .\CVS\ Readme Dec. 5, 2002 12:53 PM 3,548 3,548ml\one_class_svm\ test_kdd_10000 Dec. 4, 2002 11:00 PM 3,383,9673,383,967 ml\one_class_svm\. . .\data\ train_kdd_10000 Dec. 4, 200211:00 PM 3,383,563 3,383,563 ml\one_class_svm\. . .\data\ Root Dec. 5,2002 12:58 PM 17 17 ml\one_class_svm\. . .\CVS\ Repository Dec. 5, 200212:58 PM 29 29 ml\one_class_svm\. . .\CVS\ Entries Dec. 5, 2002 1:00 PM97 97 ml\one_class_svm\. . .\CVS\ Makefile Dec. 4, 2002 11:00 PM 1,2771,277 ml\one_class_svm\. . .\vector\ kdd_05_12_00001 Dec. 4, 2002 11:00PM 704,009 704,009 ml\one_class_svm\. . .\rslt\ Root Dec. 5, 2002 12:58PM 17 17 ml\one_class_svm\. . .\CVS\ Repository Dec. 5, 2002 12:58 PM 2929 ml\one_class_svm\. . .\CVS\ Entries Dec. 5, 2002 1:00 PM 51 51ml\one_class_svm\. . .\CVS\ run Dec. 4, 2002 11:00 PM 150 150ml\one_class_svm\. . .\vector\ svm.c Dec. 4, 2002 11:00 PM 25,646 25,646ml\one_class_svm\. . .\vector\ Root Dec. 5, 2002 12:57 PM 17 17ml\one_class_svm\. . .\CVS\ Repository Dec. 5, 2002 12:57 PM 24 24ml\one_class_svm\. . .\CVS\ Entries Dec. 5, 2002 1:00 PM 137 137ml\one_class_svm\. . .\CVS\ Root Dec. 5, 2002 12:56 PM 17 17ml\one_class_svm\. . .\CVS\ Repository Dec. 5, 2002 12:56 PM 17 17ml\one_class_svm\. . .\CVS\ Entries Dec. 5, 2002 1:00 PM 75 75ml\one_class_svm\. . .\CVS\ Attr.java Dec. 4, 2002 3:47 PM 4,075 4,075ml\cluster\code\ cist.java Dec. 4, 2002 3:47 PM 470 470 ml\cluster\code\conv.java Dec. 4, 2002 3:47 PM 6,645 6,645 ml\cluster\code\ Inst.javaDec. 4, 2002 3:47 PM 7,481 7,481 ml\cluster\code\ InstanceReader.javaDec. 4, 2002 3:47 PM 5,667 5,667 ml\cluster\code\ KMCluster.java Dec. 4,2002 3:47 PM 39,772 39,772 ml\cluster\code\ Metric.java Dec. 4, 20023:47 PM 1,486 1,486 ml\cluster\code\ SLCluster.java Dec. 4, 2002 3:47 PM3,760 3,760 ml\cluster\code\ TCluster.java Dec. 4, 2002 3:47 PM 9,0419,041 ml\cluster\code\ test1:java Dec. 4, 2002 3:41 PM 3,050 3,050ml\cluster\code\ km.java Dec. 4, 2002 3:47 PM 472 472 ml\cluster\code\1.gif Dec. 4, 2002 3:47 PM 1,089 1,089 ml\cluster\doc\ km.txt Dec. 4,2002 3:47 PM 125,581 125,581 ml\cluster\doc\ sll.bd Dec. 4, 2002 3:47 PM289,317 289,317 ml\cluster\doc\ thesis.zip Dec. 4, 2002 3:47 PM 22,81122,811 ml\cluster\doc\

What is claimed is:
 1. A method for unsupervised detection of an anomalyin the operation of a computer system comprising: (a) mapping a set ofdata instances to a feature space, wherein at least one data instance inthe set of instances is not labelled to indicate any anomaly occurrence;(b) calculating one or more sparse regions in the feature space; and (c)designating one or more data instances from the set of data instances asan anomaly if said one or more data instances is located in said one ormore sparse regions of the feature space.
 2. The method of claim 1,wherein the set of data instances comprises data instances from an auditstream.
 3. The method of claim 2, wherein the set of data instancescomprises a set of system call trace data.
 4. The method of claim 2,wherein the set of data instances comprises a set of network connectionsrecords data.
 5. The method of claim 4, wherein the set of datainstances comprises a sequence of TCP packets.
 6. The method of claim 5,wherein the features of the TCP packets comprise at least one of aduration of the network connection, a protocol type, and number of bytetransferred by the connection, and an indication of the status of theconnection.
 7. The method of claim 1, wherein mapping the set of datainstances comprises mapping the set of unlabeled data instances to avector space.
 8. The method of claim 1, wherein mapping the set of datainstances comprises normalizing the set of data instances based onrespective values of features of the set of data instances.
 9. Themethod of claim 8, further comprising normalizing each data instance inthe set of data instances based on a corresponding number of standarddeviations of each data instance from a mean of the set of datainstances.
 10. The method of claim 1, wherein mapping the set of datainstances comprises applying a convolution kernel to the set of datainstances.
 11. The method of claim 10, wherein applying a convolutionkernel comprises applying a spectrum kernel to the set of datainstances.
 12. The method of claim 1, further comprising, after mappingthe set of data instances to a feature space, associating each datainstance in the set of data instances with one of a plurality ofclusters.
 13. The method of claim 12, further comprising, determining adistance between a selected data instance and a nearest cluster in theplurality of clusters.
 14. The method of claim 13, further comprising,if the distance between the selected data instance and the nearestcluster is less than or equal to a predetermined cluster width,associating the selected data instance with the selected cluster. 15.The method of claim 13, further comprising, if the distance between theselected data instance and the selected cluster is greater than thecluster width, creating a new cluster and associating the selected datainstance with the new cluster.
 16. The method of claim 12, furthercomprising, determining a percentage of clusters having the greatestnumber of data instances respectively associated therewith.
 17. Themethod of claim 16, wherein the percentage of clusters having thegreatest number of data instances are labeled as dense regions in thefeature space and wherein the remaining clusters are labeled as sparseregions in the feature space.
 18. The method of claim 17, whereindesignating one or more data instances as an anomaly comprisesassociating each data instance in the set of data instances with arespective cluster.
 19. The method of claim 1, further comprising,determining a sum of distances between a selected data instance and knearest data instances to the selected data instance, wherein k is apredetermined value.
 20. The method of claim 19, wherein determining thesum of the distances comprises determining a nearest cluster as acluster corresponding to a shortest distance between the respectivecenter of the cluster and the selected data instance.
 21. The method ofclaim 20, further comprising, if a distance between the selected datainstance and each data instance in the nearest cluster is less than apredetermined minimum distance, designating the point the cluster as oneof the k nearest neighbors.
 22. The method of claim 21, whereindesignating one or more data instances as an anomaly comprisesdetermining whether sum of the distances to the k nearest neighborsexceeds a predetermined threshold.
 23. The method of claim 1, whereindesignating one or more data instances as an anomaly comprisesdetermining a decision function to separate the set of data instancesfrom an origin and computing the decision function.